// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from '@/store'
import "./permission";
import './styles/index.scss'
import 'element-ui/lib/theme-chalk/index.css'

Vue.config.productionTip = false;
import Element from 'element-ui';
import '@/icons';
import "@/components"
import permissionDirective from '@/directive/permission'
import 'mavon-editor/dist/css/index.css'
import mavonEditor from 'mavon-editor'

import EleForm from 'vue-ele-form'
import EleFormVideoUploader from 'vue-ele-form-video-uploader'
// 注册 ele-form
Vue.use(EleForm, {
  // 对所有具有上传属性的组件适用
  upload: {
    fileSize: 20
  },
  // 可以在这里设置全局的 video-uploader 属性
  // 具体属性列表请看下面 #attrs
  'video-uploader': {
    action: 'https://localhost:4000/list1' // 上传地址
  }
})

// 注册 video-uploader 组件
Vue.component('video-uploader', EleFormVideoUploader)
import moment from 'moment'
moment.locale('zh-cn');//需要汉化
// use
Vue.use(mavonEditor)
Vue.use(Element);
Vue.use(permissionDirective);
import * as filters from '@/filters/';

//注册全局filters
Object.keys(filters).map(key => {
  Vue.filter(key, filters[key]);
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
  moment,
});
